package com.oracle.team.domain;

import com.oracle.team.service.*;

public class Programmer extends Employee {
	private int memberId;
	private Status status = Status.FREE;
	private Equipment equipment;
	
	public Programmer(int id, String name, int age, double salary, int memberId, Status status, Equipment equipment) {
		super(id, name, age, salary);
		this.memberId = memberId;
		this.status = status;
		this.equipment = equipment;
	}

	public int getMemberId() {
		return memberId;
	}
	public void setMemberId(int memberId) {
		//memberId如果小于counter，不能设置
		this.memberId = memberId;
		
		//设置成功，counter同步更新
	}

	public Status getStatus() {
		return status;
	}
	public void setStatus(Status status) {
		this.status = status;
	}

	public Equipment getEquipment() {
		return equipment;
	}
	public void setEquipment(Equipment equipment) {
		this.equipment = equipment;
	}
	
	//覆盖重写
	//员工列表方法
	/*public String getDetails() {
		return getId() +"\t" + getName() +"\t" + getAge() +"\t" + getSalary() +"\t" +"程序员" +"\t" + Status.FREE;
	}*/
	
	//自定义方法-显示员工列表
	public String getListDetails() {
		return getDetails() +"\t" +"程序员" +"\t" + Status.FREE +"\t\t\t" + equipment.getDescription();		
	}
	
	//自定义方法-显示团队列表
	public String getTeamDetails() {
		return memberId + "/" + getDetails() + "\t程序员";		
	}

}
